{% extends '@SonataAdmin/CRUD/edit.html.twig' %}

{% block stylesheets %}
    {{ parent() }}

    <link rel="stylesheet" href="{{ asset('other/cropper/cropper.min.css') }}"/>
    <link rel="stylesheet" href="{{ asset('bundles/prestaimage/css/cropper.css') }}"/>
{% endblock %}

{% block javascripts %}
    {{ parent() }}

    <script src="{{ asset('other/cropper/cropper.js') }}" type="text/javascript"></script>
    <script src="{{ asset('bundles/prestaimage/js/cropper.js') }}" type="text/javascript"></script>
{% endblock %}

{% block form %}
    {{ parent() }}

    <script>
        $(function () {
            $('.cropper').each(function () {
                new Cropper($(this));
            });
        });
    </script>
{% endblock %}
